package com.slanmao.service.impl;

import com.slanmao.entity.Reply;
import com.slanmao.mapper.ReplyMapper;
import com.slanmao.service.ReplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <CODE>ReplyServiceImpl</CODE>
 *
 * @author fenrir
 * @Date 18-12-5
 */

@Service
public class ReplyServiceImpl implements ReplyService {

    @Autowired
    ReplyMapper replyMapper;

    @Override
    public Reply findReply(String keyword) {
        return replyMapper.findReply(keyword);
    }

    @Override
    public boolean updateReply(Reply reply) {
        return replyMapper.updateReply(reply);
    }

    @Override
    public boolean insert(Reply reply) {
        return replyMapper.insert(reply);
    }

    @Override
    public boolean delete(Integer id) {
        replyMapper.delete(id);
        return true;
    }

    @Override
    public List<Reply> list(Map<String, Integer> param) {
        return replyMapper.list(param);
    }

    @Override
    public Integer count() {
        return replyMapper.count();
    }
}
